# src/dependencies/config.py
import os

from fastapi import Depends

from src.app import app
from src.config import settings


def get_settings():
    # return get_config(os.getenv("ENV", "dev"))
    return settings


# 在路由中使用
@app.get("/protected")
def protected_route(settings=Depends(get_settings)):
    return {"token": settings.API_TOKEN}
